Conventionally, there is a game where a user operates a mobile hand-held terminal (hand-held game apparatus) while holding it, and an event is executed in accordance with the attitude and the position of the mobile hand-held terminal in real space. The mobile hand-held terminal includes a sensor that detects the position and the attitude of the mobile hand-held terminal in real space, and the user of the terminal advances the game by moving the mobile hand-held terminal and changing the attitude of the mobile hand-held terminal. For example, when rotation about a left-right direction of the mobile hand-held terminal (i.e., a direction parallel to the long side of a display screen of the mobile hand-held terminal) has been detected in real space, the point of view toward a virtual world displayed on the display screen changes upward and downward in accordance with the direction of the rotation and the amount of the rotation of the mobile hand-held terminal.
The mobile hand-held terminal, however, detects the rotation of the mobile hand-held terminal, and controls the point of view in accordance with the direction of the rotation and the amount of the rotation of the mobile hand-held terminal. Thus, the point of view that changes depending on a change in the attitude of the mobile hand-held terminal is controlled so as to move in a direction corresponding to the detected direction of the rotation and at a distance based on the amount of the rotation. That is, when the user attempts to maintain a desired point of view, the user needs to maintain the attitude of the mobile hand-held terminal in order to maintain the desired point of view. This may increase a burden on the user for maintaining the attitude.
Therefore, it is an object of the exemplary embodiment to provide a storage medium having stored thereon an information processing program capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the display apparatus, facilitating the operation based on the attitude and the motion of the display apparatus, and an information processing apparatus, an information processing system, and an information processing method that are capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the display apparatus, facilitating the operation based on the attitude and the motion of the display apparatus.
To achieve the above object, the exemplary embodiment may employ, for example, the following configurations. It is understood that when the description of the scope of the appended claims is interpreted, the scope should be interpreted only by the description of the scope of the appended claims. If the description of the scope of the appended claims contradicts the description of these columns, the description of the scope of the appended claims has priority.
In an exemplary configuration of a computer-readable storage medium having stored thereon an information processing program according to the exemplary embodiment, the information processing program is executed by a computer of an information processing apparatus capable of displaying an image on a portable display apparatus that outputs at least data based on an attitude and/or a motion of the portable display apparatus body. The information processing program causes the computer to execute: calculating, on the basis of the data output from the portable display apparatus, at least a direction of rotation and an amount of rotation of the portable display apparatus about a predetermined direction in real space; calculating a corrected amount of rotation by offsetting the calculated amount of rotation by a predetermined amount; calculating, with respect to a direction that corresponds to the predetermined direction and is set in a virtual world, an operation indication direction based on the direction of rotation and the corrected amount of rotation; performing predetermined processing on the virtual world in accordance with the operation indication direction; generating a first image including at least a part of the virtual world subjected to the processing; and displaying the first image on the portable display apparatus.
It should be noted that the information processing apparatus may be an apparatus that performs game processing and generates an image based on the game processing, or may be a versatile apparatus such as a general personal computer. The portable display apparatus may have a size small enough to be carried by a user. Typically, the portable display apparatus may be a display apparatus that allows the user to view an image displayed thereon by holding it with both hands. Further, as in a terminal apparatus according to the embodiment described later, the portable display apparatus may or may not include components other than: means for outputting at least data based on the attitude and/or the motion of the portable display apparatus body; and means for displaying the first image.
Based on the above, it is possible to set an operation indication direction in a virtual world using a corrected amount of rotation obtained by offsetting the amount of rotation of a portable display apparatus in real space by a predetermined amount. For example, an amount of offset may be set such that the operation indication direction calculated when a user maintains the portable display apparatus while holding it in a comfortable position is a direction to be used mainly in a virtual world, whereby the user can operate the portable display apparatus while being in a relatively comfortable position.
In addition, in accordance with the operation indication direction, a process may be performed of controlling an attitude of a first virtual camera set in the virtual world. An image of the virtual world viewed from the first virtual camera may be generated as the first image.
Based on the above, when an operation on the point of view and/or the direction of the line of sight toward the virtual world displayed on the portable display apparatus is performed in accordance with the attitude and the motion of the portable display apparatus, it is possible to facilitate the operation based on the attitude and the motion of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that the operation indication direction coincides with a direction of a line of sight of the first virtual camera.
Based on the above, the attitude of a virtual camera is controlled on the basis of the attitude of the portable display apparatus, whereby, in accordance with the user directing the portable display apparatus in the direction that they wish to view, it is possible to provide the user with, for example, an image as if peeping at the virtual world through the portable display apparatus. This makes it possible to provide the user with a feeling as if being in the virtual world.
In addition, using as the predetermined direction a horizontal direction in real space perpendicular to a perspective direction of a display screen of the portable display apparatus, a direction of rotation and an amount of rotation of the perspective direction may be calculated. The operation indication direction may be calculated so as to rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the corrected amount of rotation of the portable display apparatus.
In addition, the direction of rotation and the amount of rotation of the portable display apparatus about each of the predetermined direction, a direction of gravity in real space, and a horizontal direction in real space perpendicular to the predetermined direction may be calculated. The corrected amount of rotation may be calculated from the calculated amount of rotation about the predetermined direction. The operation indication direction may be calculated so as to: rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the corrected amount of rotation about the predetermined direction; rotate about a direction of gravity in the virtual world on the basis of the direction of rotation and the amount of rotation about the direction of gravity in real space; and rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the amount of rotation about the horizontal direction in real space perpendicular to the predetermined direction.
Based on the above, when an operation on the virtual world is performed in accordance with the attitude and the motion of the portable display apparatus in an up-down direction in real space, it is possible to facilitate the operation based on the attitude and the motion of the portable display apparatus in the up-down direction.
In addition, a direction of rotation and an amount of rotation of a perspective direction of a display screen of the portable display apparatus may be calculated, using as the predetermined direction a direction defined in the portable display apparatus body.
Based on the above, an amount of rotation is corrected with respect to the portable display apparatus body. This makes it possible to offset the amount of rotation, regardless of the attitude of the portable display apparatus in real space.
In addition, the corrected amount of rotation may be calculated by offsetting the calculated amount of rotation of the perspective direction about the predetermined direction, in an elevation direction and by the predetermined amount about the predetermined direction.
Based on the above, it is possible to set the operation indication direction in the virtual world, using the corrected amount of rotation obtained by offsetting the amount of rotation of the portable display apparatus in real space in an elevation direction or a depression direction and by a predetermined amount. For example, the amount of offset is set such that the operation indication direction calculated when the user maintains a comfortable position while holding the portable display apparatus is set to a horizontal direction in the virtual world. This enables the user to operate the portable display apparatus while being in a relatively comfortable position.
In addition, the corrected amount of rotation may be calculated by offsetting the calculated amount of rotation of the perspective direction about the predetermined direction, in a depression direction and by the predetermined amount about the predetermined direction.
Based on the above, it is possible to set the operation indication direction in the virtual world using the corrected amount of rotation obtained by offsetting in a depression direction the amount of rotation of the portable display apparatus in real space by a predetermined amount. For example, the amount of offset may be set such that the operation indication direction calculated when the user maintains the portable display apparatus while holding it in a comfortable position is set to the vertical direction in the virtual world, whereby the user can operate the portable display apparatus while being in a relatively comfortable position.
In addition, when, using as the predetermined amount an angle, between a horizontal direction in real space and the perspective direction, generated when the portable display apparatus is in a reference attitude in which a user views the first image displayed on the portable display apparatus while holding the portable display apparatus, an amount of rotation indicating the perspective direction of the portable display apparatus in the reference attitude is corrected to the corrected amount of rotation, the correction may be made so that a direction obtained by the corrected amount of rotation is a horizontal direction in the virtual world.
Based on the above, when the portable display apparatus is held in a reference attitude, a horizontal direction in the virtual world is set to the operation indication direction. This enables the user to operate the portable display apparatus while being in a relatively comfortable position when it is desired to set the operation indication direction to the horizontal direction in the virtual world.
In addition, when, using as the predetermined amount an angle, between a vertical direction in real space and the perspective direction, generated when the portable display apparatus is in a reference attitude in which a user views the first image displayed on the portable display apparatus while holding the portable display apparatus, an amount of rotation indicating the perspective direction of the portable display apparatus in the reference attitude is corrected to the corrected amount of rotation, the correction may be made so that a direction obtained by the corrected amount of rotation is a vertical direction in the virtual world.
Based on the above, when the portable display apparatus is held in a reference attitude, a vertical direction in the virtual world is set to the operation indication direction. This enables the user to operate the portable display apparatus while being in a relatively comfortable position when it is desired to set the operation indication direction to the vertical direction in the virtual world.
In addition, when the corrected amount of rotation indicates an amount of rotation beyond a vertically up direction in the virtual world, the corrected amount of rotation may be calculated so as to be limited to the vertically up direction. When the corrected amount of rotation indicates an amount of rotation beyond a vertically down direction in the virtual world, the corrected amount of rotation may be calculated so as to be limited to the vertically down direction.
Based on the above, the operation of setting an operation indication direction to a vertically up or vertically down direction in the virtual world is facilitated.
In addition, image data indicating the first image may be output to the portable display apparatus. The portable display apparatus may include an image data acquisition unit and a display unit. An image data acquisition unit acquires the image data output from the information processing apparatus. A display unit displays the first image indicated by the image data acquired by the image data acquisition unit.
Based on the above, the portable display apparatus can function as a so-called thin-client terminal, which does not perform information processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus. The image data acquisition unit may acquire the compression image data output from the information processing apparatus. The portable display apparatus may further include a display image decompression unit. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed before being output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, besides the first image, a second image representing the virtual world may be further displayed on another display apparatus connected to the information processing apparatus.
It should be noted that said another display apparatus described above is a display apparatus connected to the information processing apparatus, like a monitor 2 according to the embodiment described later. Said another display apparatus may be a component separate from the portable display apparatus, and may be any apparatus so long as it is capable of displaying the second image generated by the information processing apparatus. For example, said another display apparatus described above may be integrated with the game apparatus (in a single housing).
Based on the above, when processing based on the operation of moving and changing the attitude of the portable display apparatus is performed, it is possible to display the results of the processing not only on the portable display apparatus but also on said another display apparatus connected to the information processing apparatus. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of images displayed on, for example, two apparatuses, and also view an image suitable for an operation of the user. Further, it is possible to use an image displayed on said another display apparatus connected to the information processing apparatus, as, for example, an image to be viewed by another person different from the user. This makes it possible to provide a viewing environment suitable also for the case where a plurality of people view the results of the processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. The generated compression image data may be output to the portable display apparatus, and, besides the compression image data, image data indicating the second image may be output to said another display apparatus without being compressed. The portable display apparatus may include an image data acquisition unit, a display image decompression unit, and a display unit. The image data acquisition unit acquires the compression image data output from the information processing apparatus. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit displays the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed and then output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, a point of view for generating the second image may be set at a position different from a position of a point of view for generating the first image.
Based on the above, the same virtual world, different in point of view, is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world that are different in the point of view are displayed thereon. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of the images displayed on the two apparatuses when operating the portable display apparatus.
In addition, a point of view for generating the second image may be set at a position in the virtual world including a point of view for generating the first image, and a range wider than a range of the virtual world represented by the first image may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world in a display range wider than that of an image of the virtual world displayed on the portable display apparatus is displayed on said another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, a direction of a line of sight from a point of view for generating the second image may be set in a vertical direction in the virtual world, and the point of view for generating the second image may be set at a position of viewing from a bird's-eye view a point of view for generating the first image.
Based on the above, an image of the virtual world based on the attitude of the portable display apparatus is displayed on the portable display apparatus, and an image of the virtual world obtained by looking down upon it is displayed on another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the portable display apparatus may include at least one of a gyro sensor and an acceleration sensor, each of which outputs data based on the attitude and/or the motion of the portable display apparatus body. In this case, on the basis of the data output from the at least one of the gyro sensor and the acceleration sensor, the direction of rotation and the amount of rotation of the portable display apparatus may be calculated.
Based on the above, using the data that is output from the gyro sensor and indicates the angular velocity generated in the portable display apparatus and/or the data that is output from the acceleration sensor and indicates the acceleration generated in the portable display apparatus, it is possible to accurately calculate the attitude and the motion of the portable display apparatus.
In addition, the exemplary embodiment may be carried out in the forms of an information processing apparatus and an information processing system, each including units that perform the above processes, and an information processing method including the above operations.
The exemplary embodiment makes it possible to, when an image of a virtual world is displayed on a portable display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the portable display apparatus, facilitate the operation based on the attitude and the motion of the portable display apparatus.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.